import request from '@/utils/request'

// ${entityName} 模块 API 封装
// 路由前缀：/${modulePrefix}/${lowerName}
// 提供分页、列表、创建、更新、删除、批量删除方法
export const ${lowerName}Api = {
  page:(params:any)=>request.get('/${modulePrefix}/${lowerName}/page', params),
  list:()=>request.get('/${modulePrefix}/${lowerName}/list'),
  create:(data:any)=>request.post('/${modulePrefix}/${lowerName}', data),
  update:(data:any)=>request.put('/${modulePrefix}/${lowerName}', data),
  remove:(id:number)=>request.delete('/${modulePrefix}/${lowerName}/'+id),
  removeBatch:(ids:number[])=>request.delete('/${modulePrefix}/${lowerName}/batch',{ data: ids })
}
export default ${lowerName}Api


